.container {
  display: block;
  width: 120px;
  height: 120px;
  overflow: hidden;
}

.box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px dashed #dcdfe6;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    height: 120px;
    width: 120px;
    box-sizing: border-box;
    overflow: hidden;
    user-select: none;
}

.box:hover {
    border-color: #4096ff;
    color: #4096ff;
}

.img {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.img img {
    display: block;
    width: 100%;
    height: 100%;
}

.op {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    font-size: 24px;
    display: none;
}

.op span {
    position: absolute;
    top: 50%;
    left: 50%;
    color: #ffffff;
    transform: translate(-50%, -50%);
    cursor: pointer;
}

.img:hover .op {
    display: block;
}